/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canteen.sys.model.generic;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author TNT
 */
public interface GenericDAO<T, ID extends Serializable> {

    T findById(ID id, boolean lock);

    List<T> findAll();

    List<T> findByExample(T exampleInstance, String[] excludeProperty);

    List<T> findAllByStatus(boolean status);

    List<T> findAllByNameAndStatus(String name, boolean status);

    T makePersistent(T entity);

    void makeTransient(T entity);

    List<T> findAllByProByNameAndStatus(String property, int id, boolean status);
    //List<T> findAllByProperty(String propertyName, Object value);
}
